get unique values in laravel

91

get unique values in laravel -

$users = User::select('name')->distinct()->get();

get the unique rows from table laravel -

$categories = Machine::distinct('category')->pluck('category');


Comments

Submit
0 Comments